Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
manicharan-12 committed Aug 27, 2024
0 parents commit 5d7d61c
Showing 700 changed files with 117,995 additions and 0 deletions.
Binary file added Photos/Screenshot 2024-08-27 111019.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 111033.png
Copied!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 120546.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 120750.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 120823.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 120928.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Photos/Screenshot 2024-08-27 120943.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions Question 1/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
const express = require("express");
const axios = require("axios");
const crypto = require("crypto");
const cors = require("cors");

const app = express();
const PORT = 5000;
const AUTH_URL = "http://20.244.56.144/test/auth";
const BASE_URL = "http://20.244.56.144/test/companies";
const COMPANIES = ["AMZ", "FLP", "SNP", "MYN", "AZO"];

const authData = {
companyName: "affordmed",
clientID: "546e0ea2-a7b3-4a93-9368-267ac7fd5729",
clientSecret: "hKiviNrTWjxPsVKo",
ownerName: "Mani Charan Reddy Gade",
ownerEmail: "21eg112b31@anurag.edu.in",
rollNo: "21EG112B31",
};

let productCache = {};
let bearerToken = null;
let tokenExpirationTime = 0;

const generateProductId = (product) => {
return crypto.createHash("md5").update(JSON.stringify(product)).digest("hex");
};

app.use(cors());
app.use(
cors({
origin: "http://localhost:3000",
})
);

const getBearerToken = async () => {
if (bearerToken && Date.now() < tokenExpirationTime) {
return bearerToken;
}

try {
const response = await axios.post(AUTH_URL, authData);
bearerToken = response.data.token;
tokenExpirationTime = Date.now() + 3600000;
return bearerToken;
} catch (error) {
console.error("Failed to fetch bearer token:", error);
throw error;
}
};

app.get("/categories/:categoryname/products", async (req, res) => {
const { categoryname } = req.params;
const {
n = 10,
page = 1,
sort_by,
order = "asc",
minPrice = 1,
maxPrice = 10000,
} = req.query;

try {
const token = await getBearerToken();

const requests = COMPANIES.map((company) => {
return axios.get(
`${BASE_URL}/${company}/categories/${categoryname}/products?top=${n}&minPrice=${minPrice}&maxPrice=${maxPrice}`,
{
headers: {
Authorization: `Bearer ${token}`,
},
}
);
});

const responses = await Promise.all(requests);
let products = responses.flatMap((response) => response.data);

products = products.map((product) => {
const id = generateProductId(product);
productCache[id] = product;
return { ...product, id };
});

if (sort_by) {
products.sort((a, b) => {
if (order === "asc") {
return a[sort_by] > b[sort_by] ? 1 : -1;
} else {
return a[sort_by] < b[sort_by] ? 1 : -1;
}
});
}

const startIndex = (page - 1) * n;
const paginatedProducts = products.slice(startIndex, startIndex + n);

res.json(paginatedProducts);
} catch (error) {
console.error(error);
res.status(500).json({ error: "Failed to fetch products" });
}
});

app.get("/categories/:categoryname/products/:productid", (req, res) => {
const { productid } = req.params;
const product = productCache[productid];

if (product) {
res.json(product);
} else {
res.status(404).json({ error: "Product not found" });
}
});

app.listen(PORT, () => {
console.log(`Server running on http://localhost:${PORT}`);
});
16 changes: 16 additions & 0 deletions Question 1/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Question 1/node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions Question 1/node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

860 changes: 860 additions & 0 deletions Question 1/node_modules/.package-lock.json

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions Question 1/node_modules/accepts/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/accepts/LICENSE
140 changes: 140 additions & 0 deletions Question 1/node_modules/accepts/README.md
238 changes: 238 additions & 0 deletions Question 1/node_modules/accepts/index.js
47 changes: 47 additions & 0 deletions Question 1/node_modules/accepts/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/array-flatten/LICENSE
43 changes: 43 additions & 0 deletions Question 1/node_modules/array-flatten/README.md
64 changes: 64 additions & 0 deletions Question 1/node_modules/array-flatten/array-flatten.js
39 changes: 39 additions & 0 deletions Question 1/node_modules/array-flatten/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/asynckit/LICENSE
233 changes: 233 additions & 0 deletions Question 1/node_modules/asynckit/README.md
76 changes: 76 additions & 0 deletions Question 1/node_modules/asynckit/bench.js
6 changes: 6 additions & 0 deletions Question 1/node_modules/asynckit/index.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/asynckit/lib/abort.js
34 changes: 34 additions & 0 deletions Question 1/node_modules/asynckit/lib/async.js
26 changes: 26 additions & 0 deletions Question 1/node_modules/asynckit/lib/defer.js
75 changes: 75 additions & 0 deletions Question 1/node_modules/asynckit/lib/iterate.js
91 changes: 91 additions & 0 deletions Question 1/node_modules/asynckit/lib/readable_asynckit.js
25 changes: 25 additions & 0 deletions Question 1/node_modules/asynckit/lib/readable_parallel.js
25 changes: 25 additions & 0 deletions Question 1/node_modules/asynckit/lib/readable_serial.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/asynckit/lib/readable_serial_ordered.js
37 changes: 37 additions & 0 deletions Question 1/node_modules/asynckit/lib/state.js
141 changes: 141 additions & 0 deletions Question 1/node_modules/asynckit/lib/streamify.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/asynckit/lib/terminator.js
63 changes: 63 additions & 0 deletions Question 1/node_modules/asynckit/package.json
43 changes: 43 additions & 0 deletions Question 1/node_modules/asynckit/parallel.js
17 changes: 17 additions & 0 deletions Question 1/node_modules/asynckit/serial.js
75 changes: 75 additions & 0 deletions Question 1/node_modules/asynckit/serialOrdered.js
21 changes: 21 additions & 0 deletions Question 1/node_modules/asynckit/stream.js
996 changes: 996 additions & 0 deletions Question 1/node_modules/axios/CHANGELOG.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Question 1/node_modules/axios/LICENSE
3 changes: 3 additions & 0 deletions Question 1/node_modules/axios/MIGRATION_GUIDE.md
1,644 changes: 1,644 additions & 0 deletions Question 1/node_modules/axios/README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Question 1/node_modules/axios/SECURITY.md
4,269 changes: 4,269 additions & 0 deletions Question 1/node_modules/axios/dist/axios.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/axios.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Question 1/node_modules/axios/dist/axios.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/axios.min.js.map

Large diffs are not rendered by default.

3,721 changes: 3,721 additions & 0 deletions Question 1/node_modules/axios/dist/browser/axios.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/browser/axios.cjs.map

Large diffs are not rendered by default.

3,744 changes: 3,744 additions & 0 deletions Question 1/node_modules/axios/dist/esm/axios.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/esm/axios.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Question 1/node_modules/axios/dist/esm/axios.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/esm/axios.min.js.map

Large diffs are not rendered by default.

4,750 changes: 4,750 additions & 0 deletions Question 1/node_modules/axios/dist/node/axios.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Question 1/node_modules/axios/dist/node/axios.cjs.map

Large diffs are not rendered by default.

545 changes: 545 additions & 0 deletions Question 1/node_modules/axios/index.d.cts

Large diffs are not rendered by default.

562 changes: 562 additions & 0 deletions Question 1/node_modules/axios/index.d.ts

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions Question 1/node_modules/axios/index.js
37 changes: 37 additions & 0 deletions Question 1/node_modules/axios/lib/adapters/README.md
79 changes: 79 additions & 0 deletions Question 1/node_modules/axios/lib/adapters/adapters.js
232 changes: 232 additions & 0 deletions Question 1/node_modules/axios/lib/adapters/fetch.js
695 changes: 695 additions & 0 deletions Question 1/node_modules/axios/lib/adapters/http.js

Large diffs are not rendered by default.

197 changes: 197 additions & 0 deletions Question 1/node_modules/axios/lib/adapters/xhr.js
89 changes: 89 additions & 0 deletions Question 1/node_modules/axios/lib/axios.js
121 changes: 121 additions & 0 deletions Question 1/node_modules/axios/lib/cancel/CancelToken.js
25 changes: 25 additions & 0 deletions Question 1/node_modules/axios/lib/cancel/CanceledError.js
5 changes: 5 additions & 0 deletions Question 1/node_modules/axios/lib/cancel/isCancel.js
228 changes: 228 additions & 0 deletions Question 1/node_modules/axios/lib/core/Axios.js
103 changes: 103 additions & 0 deletions Question 1/node_modules/axios/lib/core/AxiosError.js
302 changes: 302 additions & 0 deletions Question 1/node_modules/axios/lib/core/AxiosHeaders.js
71 changes: 71 additions & 0 deletions Question 1/node_modules/axios/lib/core/InterceptorManager.js
8 changes: 8 additions & 0 deletions Question 1/node_modules/axios/lib/core/README.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/axios/lib/core/buildFullPath.js
81 changes: 81 additions & 0 deletions Question 1/node_modules/axios/lib/core/dispatchRequest.js
106 changes: 106 additions & 0 deletions Question 1/node_modules/axios/lib/core/mergeConfig.js
27 changes: 27 additions & 0 deletions Question 1/node_modules/axios/lib/core/settle.js
28 changes: 28 additions & 0 deletions Question 1/node_modules/axios/lib/core/transformData.js
161 changes: 161 additions & 0 deletions Question 1/node_modules/axios/lib/defaults/index.js
7 changes: 7 additions & 0 deletions Question 1/node_modules/axios/lib/defaults/transitional.js
3 changes: 3 additions & 0 deletions Question 1/node_modules/axios/lib/env/README.md
2 changes: 2 additions & 0 deletions Question 1/node_modules/axios/lib/env/classes/FormData.js
1 change: 1 addition & 0 deletions Question 1/node_modules/axios/lib/env/data.js
143 changes: 143 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/AxiosTransformStream.js
58 changes: 58 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
71 changes: 71 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/HttpStatusCode.js
7 changes: 7 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/README.md
7 changes: 7 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/bind.js
63 changes: 63 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/buildURL.js
16 changes: 16 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/callbackify.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/combineURLs.js
46 changes: 46 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/composeSignals.js
42 changes: 42 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/cookies.js
26 changes: 26 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/deprecatedMethod.js
95 changes: 95 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/formDataToJSON.js
111 changes: 111 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/formDataToStream.js
53 changes: 53 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/fromDataURI.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/isAbsoluteURL.js
14 changes: 14 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/isAxiosError.js
67 changes: 67 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/isURLSameOrigin.js
2 changes: 2 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/null.js
55 changes: 55 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/parseHeaders.js
6 changes: 6 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/parseProtocol.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/progressEventReducer.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/readBlob.js
57 changes: 57 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/resolveConfig.js
55 changes: 55 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/speedometer.js
28 changes: 28 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/spread.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/throttle.js
219 changes: 219 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/toFormData.js
18 changes: 18 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/toURLEncodedForm.js
67 changes: 67 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/trackStream.js
91 changes: 91 additions & 0 deletions Question 1/node_modules/axios/lib/helpers/validator.js
13 changes: 13 additions & 0 deletions Question 1/node_modules/axios/lib/platform/browser/index.js
51 changes: 51 additions & 0 deletions Question 1/node_modules/axios/lib/platform/common/utils.js
7 changes: 7 additions & 0 deletions Question 1/node_modules/axios/lib/platform/index.js
12 changes: 12 additions & 0 deletions Question 1/node_modules/axios/lib/platform/node/index.js
760 changes: 760 additions & 0 deletions Question 1/node_modules/axios/lib/utils.js

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions Question 1/node_modules/axios/package.json
665 changes: 665 additions & 0 deletions Question 1/node_modules/body-parser/HISTORY.md

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions Question 1/node_modules/body-parser/LICENSE
465 changes: 465 additions & 0 deletions Question 1/node_modules/body-parser/README.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Question 1/node_modules/body-parser/SECURITY.md
156 changes: 156 additions & 0 deletions Question 1/node_modules/body-parser/index.js
205 changes: 205 additions & 0 deletions Question 1/node_modules/body-parser/lib/read.js
247 changes: 247 additions & 0 deletions Question 1/node_modules/body-parser/lib/types/json.js
101 changes: 101 additions & 0 deletions Question 1/node_modules/body-parser/lib/types/raw.js
121 changes: 121 additions & 0 deletions Question 1/node_modules/body-parser/lib/types/text.js
284 changes: 284 additions & 0 deletions Question 1/node_modules/body-parser/lib/types/urlencoded.js
56 changes: 56 additions & 0 deletions Question 1/node_modules/body-parser/package.json
97 changes: 97 additions & 0 deletions Question 1/node_modules/bytes/History.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/bytes/LICENSE
152 changes: 152 additions & 0 deletions Question 1/node_modules/bytes/Readme.md
170 changes: 170 additions & 0 deletions Question 1/node_modules/bytes/index.js
42 changes: 42 additions & 0 deletions Question 1/node_modules/bytes/package.json
1 change: 1 addition & 0 deletions Question 1/node_modules/call-bind/.eslintignore
16 changes: 16 additions & 0 deletions Question 1/node_modules/call-bind/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/call-bind/.github/FUNDING.yml
9 changes: 9 additions & 0 deletions Question 1/node_modules/call-bind/.nycrc
93 changes: 93 additions & 0 deletions Question 1/node_modules/call-bind/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/call-bind/LICENSE
64 changes: 64 additions & 0 deletions Question 1/node_modules/call-bind/README.md
15 changes: 15 additions & 0 deletions Question 1/node_modules/call-bind/callBound.js
35 changes: 35 additions & 0 deletions Question 1/node_modules/call-bind/index.js
95 changes: 95 additions & 0 deletions Question 1/node_modules/call-bind/package.json
54 changes: 54 additions & 0 deletions Question 1/node_modules/call-bind/test/callBound.js
80 changes: 80 additions & 0 deletions Question 1/node_modules/call-bind/test/index.js
19 changes: 19 additions & 0 deletions Question 1/node_modules/combined-stream/License
138 changes: 138 additions & 0 deletions Question 1/node_modules/combined-stream/Readme.md
208 changes: 208 additions & 0 deletions Question 1/node_modules/combined-stream/lib/combined_stream.js
25 changes: 25 additions & 0 deletions Question 1/node_modules/combined-stream/package.json
17 changes: 17 additions & 0 deletions Question 1/node_modules/combined-stream/yarn.lock
60 changes: 60 additions & 0 deletions Question 1/node_modules/content-disposition/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/content-disposition/LICENSE
142 changes: 142 additions & 0 deletions Question 1/node_modules/content-disposition/README.md
458 changes: 458 additions & 0 deletions Question 1/node_modules/content-disposition/index.js

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions Question 1/node_modules/content-disposition/package.json
29 changes: 29 additions & 0 deletions Question 1/node_modules/content-type/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/content-type/LICENSE
94 changes: 94 additions & 0 deletions Question 1/node_modules/content-type/README.md
225 changes: 225 additions & 0 deletions Question 1/node_modules/content-type/index.js
42 changes: 42 additions & 0 deletions Question 1/node_modules/content-type/package.json
4 changes: 4 additions & 0 deletions Question 1/node_modules/cookie-signature/.npmignore
38 changes: 38 additions & 0 deletions Question 1/node_modules/cookie-signature/History.md
42 changes: 42 additions & 0 deletions Question 1/node_modules/cookie-signature/Readme.md
51 changes: 51 additions & 0 deletions Question 1/node_modules/cookie-signature/index.js
18 changes: 18 additions & 0 deletions Question 1/node_modules/cookie-signature/package.json
147 changes: 147 additions & 0 deletions Question 1/node_modules/cookie/HISTORY.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/cookie/LICENSE
317 changes: 317 additions & 0 deletions Question 1/node_modules/cookie/README.md
25 changes: 25 additions & 0 deletions Question 1/node_modules/cookie/SECURITY.md
274 changes: 274 additions & 0 deletions Question 1/node_modules/cookie/index.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/cookie/package.json
33 changes: 33 additions & 0 deletions Question 1/node_modules/cors/CONTRIBUTING.md
58 changes: 58 additions & 0 deletions Question 1/node_modules/cors/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/cors/LICENSE
243 changes: 243 additions & 0 deletions Question 1/node_modules/cors/README.md
238 changes: 238 additions & 0 deletions Question 1/node_modules/cors/lib/index.js
41 changes: 41 additions & 0 deletions Question 1/node_modules/cors/package.json
7 changes: 7 additions & 0 deletions Question 1/node_modules/crypto/README.md
19 changes: 19 additions & 0 deletions Question 1/node_modules/crypto/package.json
1 change: 1 addition & 0 deletions Question 1/node_modules/debug/.coveralls.yml
11 changes: 11 additions & 0 deletions Question 1/node_modules/debug/.eslintrc
9 changes: 9 additions & 0 deletions Question 1/node_modules/debug/.npmignore
14 changes: 14 additions & 0 deletions Question 1/node_modules/debug/.travis.yml
362 changes: 362 additions & 0 deletions Question 1/node_modules/debug/CHANGELOG.md
19 changes: 19 additions & 0 deletions Question 1/node_modules/debug/LICENSE
50 changes: 50 additions & 0 deletions Question 1/node_modules/debug/Makefile
312 changes: 312 additions & 0 deletions Question 1/node_modules/debug/README.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions Question 1/node_modules/debug/component.json
70 changes: 70 additions & 0 deletions Question 1/node_modules/debug/karma.conf.js
1 change: 1 addition & 0 deletions Question 1/node_modules/debug/node.js
49 changes: 49 additions & 0 deletions Question 1/node_modules/debug/package.json
185 changes: 185 additions & 0 deletions Question 1/node_modules/debug/src/browser.js
202 changes: 202 additions & 0 deletions Question 1/node_modules/debug/src/debug.js
10 changes: 10 additions & 0 deletions Question 1/node_modules/debug/src/index.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/debug/src/inspector-log.js
248 changes: 248 additions & 0 deletions Question 1/node_modules/debug/src/node.js
24 changes: 24 additions & 0 deletions Question 1/node_modules/define-data-property/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/define-data-property/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/define-data-property/.nycrc
70 changes: 70 additions & 0 deletions Question 1/node_modules/define-data-property/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/define-data-property/LICENSE
67 changes: 67 additions & 0 deletions Question 1/node_modules/define-data-property/README.md
12 changes: 12 additions & 0 deletions Question 1/node_modules/define-data-property/index.d.ts
56 changes: 56 additions & 0 deletions Question 1/node_modules/define-data-property/index.js
106 changes: 106 additions & 0 deletions Question 1/node_modules/define-data-property/package.json
392 changes: 392 additions & 0 deletions Question 1/node_modules/define-data-property/test/index.js
59 changes: 59 additions & 0 deletions Question 1/node_modules/define-data-property/tsconfig.json
1 change: 1 addition & 0 deletions Question 1/node_modules/delayed-stream/.npmignore
19 changes: 19 additions & 0 deletions Question 1/node_modules/delayed-stream/License
7 changes: 7 additions & 0 deletions Question 1/node_modules/delayed-stream/Makefile
141 changes: 141 additions & 0 deletions Question 1/node_modules/delayed-stream/Readme.md
107 changes: 107 additions & 0 deletions Question 1/node_modules/delayed-stream/lib/delayed_stream.js
27 changes: 27 additions & 0 deletions Question 1/node_modules/delayed-stream/package.json
103 changes: 103 additions & 0 deletions Question 1/node_modules/depd/History.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/depd/LICENSE
280 changes: 280 additions & 0 deletions Question 1/node_modules/depd/Readme.md
538 changes: 538 additions & 0 deletions Question 1/node_modules/depd/index.js

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions Question 1/node_modules/depd/lib/browser/index.js
45 changes: 45 additions & 0 deletions Question 1/node_modules/depd/package.json
23 changes: 23 additions & 0 deletions Question 1/node_modules/destroy/LICENSE
63 changes: 63 additions & 0 deletions Question 1/node_modules/destroy/README.md
209 changes: 209 additions & 0 deletions Question 1/node_modules/destroy/index.js
48 changes: 48 additions & 0 deletions Question 1/node_modules/destroy/package.json
22 changes: 22 additions & 0 deletions Question 1/node_modules/ee-first/LICENSE
80 changes: 80 additions & 0 deletions Question 1/node_modules/ee-first/README.md
95 changes: 95 additions & 0 deletions Question 1/node_modules/ee-first/index.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/ee-first/package.json
14 changes: 14 additions & 0 deletions Question 1/node_modules/encodeurl/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/encodeurl/LICENSE
128 changes: 128 additions & 0 deletions Question 1/node_modules/encodeurl/README.md
60 changes: 60 additions & 0 deletions Question 1/node_modules/encodeurl/index.js
40 changes: 40 additions & 0 deletions Question 1/node_modules/encodeurl/package.json
13 changes: 13 additions & 0 deletions Question 1/node_modules/es-define-property/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/es-define-property/.github/FUNDING.yml
9 changes: 9 additions & 0 deletions Question 1/node_modules/es-define-property/.nycrc
15 changes: 15 additions & 0 deletions Question 1/node_modules/es-define-property/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/es-define-property/LICENSE
49 changes: 49 additions & 0 deletions Question 1/node_modules/es-define-property/README.md
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-define-property/index.d.ts
16 changes: 16 additions & 0 deletions Question 1/node_modules/es-define-property/index.js
81 changes: 81 additions & 0 deletions Question 1/node_modules/es-define-property/package.json
55 changes: 55 additions & 0 deletions Question 1/node_modules/es-define-property/test/index.js
50 changes: 50 additions & 0 deletions Question 1/node_modules/es-define-property/tsconfig.json
5 changes: 5 additions & 0 deletions Question 1/node_modules/es-errors/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/es-errors/.github/FUNDING.yml
40 changes: 40 additions & 0 deletions Question 1/node_modules/es-errors/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/es-errors/LICENSE
55 changes: 55 additions & 0 deletions Question 1/node_modules/es-errors/README.md
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/eval.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/eval.js
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/index.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/index.js
80 changes: 80 additions & 0 deletions Question 1/node_modules/es-errors/package.json
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/range.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/range.js
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/ref.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/ref.js
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/syntax.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/syntax.js
19 changes: 19 additions & 0 deletions Question 1/node_modules/es-errors/test/index.js
49 changes: 49 additions & 0 deletions Question 1/node_modules/es-errors/tsconfig.json
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/type.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/type.js
3 changes: 3 additions & 0 deletions Question 1/node_modules/es-errors/uri.d.ts
4 changes: 4 additions & 0 deletions Question 1/node_modules/es-errors/uri.js
24 changes: 24 additions & 0 deletions Question 1/node_modules/escape-html/LICENSE
43 changes: 43 additions & 0 deletions Question 1/node_modules/escape-html/Readme.md
78 changes: 78 additions & 0 deletions Question 1/node_modules/escape-html/index.js
24 changes: 24 additions & 0 deletions Question 1/node_modules/escape-html/package.json
83 changes: 83 additions & 0 deletions Question 1/node_modules/etag/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/etag/LICENSE
159 changes: 159 additions & 0 deletions Question 1/node_modules/etag/README.md
131 changes: 131 additions & 0 deletions Question 1/node_modules/etag/index.js
47 changes: 47 additions & 0 deletions Question 1/node_modules/etag/package.json
3,615 changes: 3,615 additions & 0 deletions Question 1/node_modules/express/History.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Question 1/node_modules/express/LICENSE
166 changes: 166 additions & 0 deletions Question 1/node_modules/express/Readme.md
11 changes: 11 additions & 0 deletions Question 1/node_modules/express/index.js
661 changes: 661 additions & 0 deletions Question 1/node_modules/express/lib/application.js

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions Question 1/node_modules/express/lib/express.js
43 changes: 43 additions & 0 deletions Question 1/node_modules/express/lib/middleware/init.js
47 changes: 47 additions & 0 deletions Question 1/node_modules/express/lib/middleware/query.js
525 changes: 525 additions & 0 deletions Question 1/node_modules/express/lib/request.js

Large diffs are not rendered by default.

1,178 changes: 1,178 additions & 0 deletions Question 1/node_modules/express/lib/response.js

Large diffs are not rendered by default.

673 changes: 673 additions & 0 deletions Question 1/node_modules/express/lib/router/index.js

Large diffs are not rendered by default.

181 changes: 181 additions & 0 deletions Question 1/node_modules/express/lib/router/layer.js
230 changes: 230 additions & 0 deletions Question 1/node_modules/express/lib/router/route.js
303 changes: 303 additions & 0 deletions Question 1/node_modules/express/lib/utils.js
182 changes: 182 additions & 0 deletions Question 1/node_modules/express/lib/view.js
98 changes: 98 additions & 0 deletions Question 1/node_modules/express/package.json
195 changes: 195 additions & 0 deletions Question 1/node_modules/finalhandler/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/finalhandler/LICENSE
147 changes: 147 additions & 0 deletions Question 1/node_modules/finalhandler/README.md
25 changes: 25 additions & 0 deletions Question 1/node_modules/finalhandler/SECURITY.md
336 changes: 336 additions & 0 deletions Question 1/node_modules/finalhandler/index.js
46 changes: 46 additions & 0 deletions Question 1/node_modules/finalhandler/package.json
18 changes: 18 additions & 0 deletions Question 1/node_modules/follow-redirects/LICENSE
155 changes: 155 additions & 0 deletions Question 1/node_modules/follow-redirects/README.md
15 changes: 15 additions & 0 deletions Question 1/node_modules/follow-redirects/debug.js
1 change: 1 addition & 0 deletions Question 1/node_modules/follow-redirects/http.js
1 change: 1 addition & 0 deletions Question 1/node_modules/follow-redirects/https.js
672 changes: 672 additions & 0 deletions Question 1/node_modules/follow-redirects/index.js

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions Question 1/node_modules/follow-redirects/package.json
19 changes: 19 additions & 0 deletions Question 1/node_modules/form-data/License
358 changes: 358 additions & 0 deletions Question 1/node_modules/form-data/README.md.bak
358 changes: 358 additions & 0 deletions Question 1/node_modules/form-data/Readme.md
62 changes: 62 additions & 0 deletions Question 1/node_modules/form-data/index.d.ts
2 changes: 2 additions & 0 deletions Question 1/node_modules/form-data/lib/browser.js
501 changes: 501 additions & 0 deletions Question 1/node_modules/form-data/lib/form_data.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Question 1/node_modules/form-data/lib/populate.js
68 changes: 68 additions & 0 deletions Question 1/node_modules/form-data/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/forwarded/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/forwarded/LICENSE
57 changes: 57 additions & 0 deletions Question 1/node_modules/forwarded/README.md
90 changes: 90 additions & 0 deletions Question 1/node_modules/forwarded/index.js
45 changes: 45 additions & 0 deletions Question 1/node_modules/forwarded/package.json
70 changes: 70 additions & 0 deletions Question 1/node_modules/fresh/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/fresh/LICENSE
119 changes: 119 additions & 0 deletions Question 1/node_modules/fresh/README.md
137 changes: 137 additions & 0 deletions Question 1/node_modules/fresh/index.js
46 changes: 46 additions & 0 deletions Question 1/node_modules/fresh/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/function-bind/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/function-bind/.github/FUNDING.yml
3 changes: 3 additions & 0 deletions Question 1/node_modules/function-bind/.github/SECURITY.md
13 changes: 13 additions & 0 deletions Question 1/node_modules/function-bind/.nycrc
136 changes: 136 additions & 0 deletions Question 1/node_modules/function-bind/CHANGELOG.md
20 changes: 20 additions & 0 deletions Question 1/node_modules/function-bind/LICENSE
46 changes: 46 additions & 0 deletions Question 1/node_modules/function-bind/README.md
84 changes: 84 additions & 0 deletions Question 1/node_modules/function-bind/implementation.js
5 changes: 5 additions & 0 deletions Question 1/node_modules/function-bind/index.js
87 changes: 87 additions & 0 deletions Question 1/node_modules/function-bind/package.json
9 changes: 9 additions & 0 deletions Question 1/node_modules/function-bind/test/.eslintrc
252 changes: 252 additions & 0 deletions Question 1/node_modules/function-bind/test/index.js
38 changes: 38 additions & 0 deletions Question 1/node_modules/get-intrinsic/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/get-intrinsic/.github/FUNDING.yml
9 changes: 9 additions & 0 deletions Question 1/node_modules/get-intrinsic/.nycrc
143 changes: 143 additions & 0 deletions Question 1/node_modules/get-intrinsic/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/get-intrinsic/LICENSE
71 changes: 71 additions & 0 deletions Question 1/node_modules/get-intrinsic/README.md
359 changes: 359 additions & 0 deletions Question 1/node_modules/get-intrinsic/index.js
93 changes: 93 additions & 0 deletions Question 1/node_modules/get-intrinsic/package.json
274 changes: 274 additions & 0 deletions Question 1/node_modules/get-intrinsic/test/GetIntrinsic.js
16 changes: 16 additions & 0 deletions Question 1/node_modules/gopd/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/gopd/.github/FUNDING.yml
25 changes: 25 additions & 0 deletions Question 1/node_modules/gopd/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/gopd/LICENSE
40 changes: 40 additions & 0 deletions Question 1/node_modules/gopd/README.md
16 changes: 16 additions & 0 deletions Question 1/node_modules/gopd/index.js
71 changes: 71 additions & 0 deletions Question 1/node_modules/gopd/package.json
35 changes: 35 additions & 0 deletions Question 1/node_modules/gopd/test/index.js
13 changes: 13 additions & 0 deletions Question 1/node_modules/has-property-descriptors/.eslintrc
9 changes: 9 additions & 0 deletions Question 1/node_modules/has-property-descriptors/.nycrc
35 changes: 35 additions & 0 deletions Question 1/node_modules/has-property-descriptors/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/has-property-descriptors/LICENSE
43 changes: 43 additions & 0 deletions Question 1/node_modules/has-property-descriptors/README.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/has-property-descriptors/index.js
77 changes: 77 additions & 0 deletions Question 1/node_modules/has-property-descriptors/package.json
57 changes: 57 additions & 0 deletions Question 1/node_modules/has-property-descriptors/test/index.js
5 changes: 5 additions & 0 deletions Question 1/node_modules/has-proto/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/has-proto/.github/FUNDING.yml
38 changes: 38 additions & 0 deletions Question 1/node_modules/has-proto/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/has-proto/LICENSE
38 changes: 38 additions & 0 deletions Question 1/node_modules/has-proto/README.md
3 changes: 3 additions & 0 deletions Question 1/node_modules/has-proto/index.d.ts
15 changes: 15 additions & 0 deletions Question 1/node_modules/has-proto/index.js
78 changes: 78 additions & 0 deletions Question 1/node_modules/has-proto/package.json
19 changes: 19 additions & 0 deletions Question 1/node_modules/has-proto/test/index.js
49 changes: 49 additions & 0 deletions Question 1/node_modules/has-proto/tsconfig.json
11 changes: 11 additions & 0 deletions Question 1/node_modules/has-symbols/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/has-symbols/.github/FUNDING.yml
9 changes: 9 additions & 0 deletions Question 1/node_modules/has-symbols/.nycrc
75 changes: 75 additions & 0 deletions Question 1/node_modules/has-symbols/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/has-symbols/LICENSE
46 changes: 46 additions & 0 deletions Question 1/node_modules/has-symbols/README.md
13 changes: 13 additions & 0 deletions Question 1/node_modules/has-symbols/index.js
101 changes: 101 additions & 0 deletions Question 1/node_modules/has-symbols/package.json
42 changes: 42 additions & 0 deletions Question 1/node_modules/has-symbols/shams.js
22 changes: 22 additions & 0 deletions Question 1/node_modules/has-symbols/test/index.js
28 changes: 28 additions & 0 deletions Question 1/node_modules/has-symbols/test/shams/core-js.js
56 changes: 56 additions & 0 deletions Question 1/node_modules/has-symbols/test/tests.js
5 changes: 5 additions & 0 deletions Question 1/node_modules/hasown/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/hasown/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/hasown/.nycrc
40 changes: 40 additions & 0 deletions Question 1/node_modules/hasown/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/hasown/LICENSE
40 changes: 40 additions & 0 deletions Question 1/node_modules/hasown/README.md
3 changes: 3 additions & 0 deletions Question 1/node_modules/hasown/index.d.ts
8 changes: 8 additions & 0 deletions Question 1/node_modules/hasown/index.js
92 changes: 92 additions & 0 deletions Question 1/node_modules/hasown/package.json
6 changes: 6 additions & 0 deletions Question 1/node_modules/hasown/tsconfig.json
180 changes: 180 additions & 0 deletions Question 1/node_modules/http-errors/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/http-errors/LICENSE
169 changes: 169 additions & 0 deletions Question 1/node_modules/http-errors/README.md
289 changes: 289 additions & 0 deletions Question 1/node_modules/http-errors/index.js
50 changes: 50 additions & 0 deletions Question 1/node_modules/http-errors/package.json
162 changes: 162 additions & 0 deletions Question 1/node_modules/iconv-lite/Changelog.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/iconv-lite/LICENSE
156 changes: 156 additions & 0 deletions Question 1/node_modules/iconv-lite/README.md
555 changes: 555 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/dbcs-codec.js

Large diffs are not rendered by default.

176 changes: 176 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/dbcs-data.js
22 changes: 22 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/index.js
188 changes: 188 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/internal.js
72 changes: 72 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/sbcs-codec.js
451 changes: 451 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/sbcs-data-generated.js

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/sbcs-data.js
122 changes: 122 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/big5-added.json

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/cp936.json

Large diffs are not rendered by default.

273 changes: 273 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/cp949.json

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/cp950.json

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/eucjp.json

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/gbk-added.json
125 changes: 125 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/tables/shiftjis.json

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/utf16.js
290 changes: 290 additions & 0 deletions Question 1/node_modules/iconv-lite/encodings/utf7.js
52 changes: 52 additions & 0 deletions Question 1/node_modules/iconv-lite/lib/bom-handling.js
217 changes: 217 additions & 0 deletions Question 1/node_modules/iconv-lite/lib/extend-node.js
24 changes: 24 additions & 0 deletions Question 1/node_modules/iconv-lite/lib/index.d.ts
153 changes: 153 additions & 0 deletions Question 1/node_modules/iconv-lite/lib/index.js
121 changes: 121 additions & 0 deletions Question 1/node_modules/iconv-lite/lib/streams.js
46 changes: 46 additions & 0 deletions Question 1/node_modules/iconv-lite/package.json
16 changes: 16 additions & 0 deletions Question 1/node_modules/inherits/LICENSE
42 changes: 42 additions & 0 deletions Question 1/node_modules/inherits/README.md
9 changes: 9 additions & 0 deletions Question 1/node_modules/inherits/inherits.js
27 changes: 27 additions & 0 deletions Question 1/node_modules/inherits/inherits_browser.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/inherits/package.json
19 changes: 19 additions & 0 deletions Question 1/node_modules/ipaddr.js/LICENSE
233 changes: 233 additions & 0 deletions Question 1/node_modules/ipaddr.js/README.md
1 change: 1 addition & 0 deletions Question 1/node_modules/ipaddr.js/ipaddr.min.js
673 changes: 673 additions & 0 deletions Question 1/node_modules/ipaddr.js/lib/ipaddr.js

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions Question 1/node_modules/ipaddr.js/lib/ipaddr.js.d.ts
35 changes: 35 additions & 0 deletions Question 1/node_modules/ipaddr.js/package.json
22 changes: 22 additions & 0 deletions Question 1/node_modules/media-typer/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/media-typer/LICENSE
81 changes: 81 additions & 0 deletions Question 1/node_modules/media-typer/README.md
270 changes: 270 additions & 0 deletions Question 1/node_modules/media-typer/index.js
26 changes: 26 additions & 0 deletions Question 1/node_modules/media-typer/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/merge-descriptors/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/merge-descriptors/LICENSE
48 changes: 48 additions & 0 deletions Question 1/node_modules/merge-descriptors/README.md
60 changes: 60 additions & 0 deletions Question 1/node_modules/merge-descriptors/index.js
32 changes: 32 additions & 0 deletions Question 1/node_modules/merge-descriptors/package.json
29 changes: 29 additions & 0 deletions Question 1/node_modules/methods/HISTORY.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/methods/LICENSE
51 changes: 51 additions & 0 deletions Question 1/node_modules/methods/README.md
69 changes: 69 additions & 0 deletions Question 1/node_modules/methods/index.js
36 changes: 36 additions & 0 deletions Question 1/node_modules/methods/package.json
507 changes: 507 additions & 0 deletions Question 1/node_modules/mime-db/HISTORY.md

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions Question 1/node_modules/mime-db/LICENSE
100 changes: 100 additions & 0 deletions Question 1/node_modules/mime-db/README.md
8,519 changes: 8,519 additions & 0 deletions Question 1/node_modules/mime-db/db.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Question 1/node_modules/mime-db/index.js
60 changes: 60 additions & 0 deletions Question 1/node_modules/mime-db/package.json
397 changes: 397 additions & 0 deletions Question 1/node_modules/mime-types/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/mime-types/LICENSE
113 changes: 113 additions & 0 deletions Question 1/node_modules/mime-types/README.md
188 changes: 188 additions & 0 deletions Question 1/node_modules/mime-types/index.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/mime-types/package.json
Empty file.
164 changes: 164 additions & 0 deletions Question 1/node_modules/mime/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/mime/LICENSE
90 changes: 90 additions & 0 deletions Question 1/node_modules/mime/README.md
8 changes: 8 additions & 0 deletions Question 1/node_modules/mime/cli.js
108 changes: 108 additions & 0 deletions Question 1/node_modules/mime/mime.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/mime/package.json
53 changes: 53 additions & 0 deletions Question 1/node_modules/mime/src/build.js
60 changes: 60 additions & 0 deletions Question 1/node_modules/mime/src/test.js
1 change: 1 addition & 0 deletions Question 1/node_modules/mime/types.json

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions Question 1/node_modules/ms/index.js
21 changes: 21 additions & 0 deletions Question 1/node_modules/ms/license.md
37 changes: 37 additions & 0 deletions Question 1/node_modules/ms/package.json
51 changes: 51 additions & 0 deletions Question 1/node_modules/ms/readme.md
108 changes: 108 additions & 0 deletions Question 1/node_modules/negotiator/HISTORY.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/negotiator/LICENSE
203 changes: 203 additions & 0 deletions Question 1/node_modules/negotiator/README.md
82 changes: 82 additions & 0 deletions Question 1/node_modules/negotiator/index.js
169 changes: 169 additions & 0 deletions Question 1/node_modules/negotiator/lib/charset.js
184 changes: 184 additions & 0 deletions Question 1/node_modules/negotiator/lib/encoding.js
179 changes: 179 additions & 0 deletions Question 1/node_modules/negotiator/lib/language.js
294 changes: 294 additions & 0 deletions Question 1/node_modules/negotiator/lib/mediaType.js
42 changes: 42 additions & 0 deletions Question 1/node_modules/negotiator/package.json
90 changes: 90 additions & 0 deletions Question 1/node_modules/object-assign/index.js
21 changes: 21 additions & 0 deletions Question 1/node_modules/object-assign/license
42 changes: 42 additions & 0 deletions Question 1/node_modules/object-assign/package.json
61 changes: 61 additions & 0 deletions Question 1/node_modules/object-assign/readme.md
53 changes: 53 additions & 0 deletions Question 1/node_modules/object-inspect/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/object-inspect/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/object-inspect/.nycrc
404 changes: 404 additions & 0 deletions Question 1/node_modules/object-inspect/CHANGELOG.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions Question 1/node_modules/object-inspect/LICENSE
23 changes: 23 additions & 0 deletions Question 1/node_modules/object-inspect/example/all.js
6 changes: 6 additions & 0 deletions Question 1/node_modules/object-inspect/example/circular.js
5 changes: 5 additions & 0 deletions Question 1/node_modules/object-inspect/example/fn.js
10 changes: 10 additions & 0 deletions Question 1/node_modules/object-inspect/example/inspect.js
527 changes: 527 additions & 0 deletions Question 1/node_modules/object-inspect/index.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions Question 1/node_modules/object-inspect/package-support.json
104 changes: 104 additions & 0 deletions Question 1/node_modules/object-inspect/package.json
84 changes: 84 additions & 0 deletions Question 1/node_modules/object-inspect/readme.markdown
26 changes: 26 additions & 0 deletions Question 1/node_modules/object-inspect/test-core-js.js
58 changes: 58 additions & 0 deletions Question 1/node_modules/object-inspect/test/bigint.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/object-inspect/test/browser/dom.js
16 changes: 16 additions & 0 deletions Question 1/node_modules/object-inspect/test/circular.js
12 changes: 12 additions & 0 deletions Question 1/node_modules/object-inspect/test/deep.js
53 changes: 53 additions & 0 deletions Question 1/node_modules/object-inspect/test/element.js
48 changes: 48 additions & 0 deletions Question 1/node_modules/object-inspect/test/err.js
29 changes: 29 additions & 0 deletions Question 1/node_modules/object-inspect/test/fakes.js
76 changes: 76 additions & 0 deletions Question 1/node_modules/object-inspect/test/fn.js
17 changes: 17 additions & 0 deletions Question 1/node_modules/object-inspect/test/global.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/object-inspect/test/has.js
15 changes: 15 additions & 0 deletions Question 1/node_modules/object-inspect/test/holes.js
271 changes: 271 additions & 0 deletions Question 1/node_modules/object-inspect/test/indent-option.js
139 changes: 139 additions & 0 deletions Question 1/node_modules/object-inspect/test/inspect.js
12 changes: 12 additions & 0 deletions Question 1/node_modules/object-inspect/test/lowbyte.js
58 changes: 58 additions & 0 deletions Question 1/node_modules/object-inspect/test/number.js
17 changes: 17 additions & 0 deletions Question 1/node_modules/object-inspect/test/quoteStyle.js
40 changes: 40 additions & 0 deletions Question 1/node_modules/object-inspect/test/toStringTag.js
12 changes: 12 additions & 0 deletions Question 1/node_modules/object-inspect/test/undef.js
211 changes: 211 additions & 0 deletions Question 1/node_modules/object-inspect/test/values.js
1 change: 1 addition & 0 deletions Question 1/node_modules/object-inspect/util.inspect.js
98 changes: 98 additions & 0 deletions Question 1/node_modules/on-finished/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/on-finished/LICENSE
162 changes: 162 additions & 0 deletions Question 1/node_modules/on-finished/README.md
234 changes: 234 additions & 0 deletions Question 1/node_modules/on-finished/index.js
39 changes: 39 additions & 0 deletions Question 1/node_modules/on-finished/package.json
58 changes: 58 additions & 0 deletions Question 1/node_modules/parseurl/HISTORY.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/parseurl/LICENSE
133 changes: 133 additions & 0 deletions Question 1/node_modules/parseurl/README.md
158 changes: 158 additions & 0 deletions Question 1/node_modules/parseurl/index.js
40 changes: 40 additions & 0 deletions Question 1/node_modules/parseurl/package.json
36 changes: 36 additions & 0 deletions Question 1/node_modules/path-to-regexp/History.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/path-to-regexp/LICENSE
35 changes: 35 additions & 0 deletions Question 1/node_modules/path-to-regexp/Readme.md
129 changes: 129 additions & 0 deletions Question 1/node_modules/path-to-regexp/index.js
30 changes: 30 additions & 0 deletions Question 1/node_modules/path-to-regexp/package.json
161 changes: 161 additions & 0 deletions Question 1/node_modules/proxy-addr/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/proxy-addr/LICENSE
139 changes: 139 additions & 0 deletions Question 1/node_modules/proxy-addr/README.md
327 changes: 327 additions & 0 deletions Question 1/node_modules/proxy-addr/index.js
47 changes: 47 additions & 0 deletions Question 1/node_modules/proxy-addr/package.json
29 changes: 29 additions & 0 deletions Question 1/node_modules/proxy-from-env/.eslintrc
10 changes: 10 additions & 0 deletions Question 1/node_modules/proxy-from-env/.travis.yml
20 changes: 20 additions & 0 deletions Question 1/node_modules/proxy-from-env/LICENSE
131 changes: 131 additions & 0 deletions Question 1/node_modules/proxy-from-env/README.md
108 changes: 108 additions & 0 deletions Question 1/node_modules/proxy-from-env/index.js
34 changes: 34 additions & 0 deletions Question 1/node_modules/proxy-from-env/package.json
483 changes: 483 additions & 0 deletions Question 1/node_modules/proxy-from-env/test.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions Question 1/node_modules/qs/.editorconfig
38 changes: 38 additions & 0 deletions Question 1/node_modules/qs/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/qs/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/qs/.nycrc
546 changes: 546 additions & 0 deletions Question 1/node_modules/qs/CHANGELOG.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions Question 1/node_modules/qs/LICENSE.md
625 changes: 625 additions & 0 deletions Question 1/node_modules/qs/README.md

Large diffs are not rendered by default.

2,054 changes: 2,054 additions & 0 deletions Question 1/node_modules/qs/dist/qs.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions Question 1/node_modules/qs/lib/formats.js
11 changes: 11 additions & 0 deletions Question 1/node_modules/qs/lib/index.js
263 changes: 263 additions & 0 deletions Question 1/node_modules/qs/lib/parse.js
326 changes: 326 additions & 0 deletions Question 1/node_modules/qs/lib/stringify.js
252 changes: 252 additions & 0 deletions Question 1/node_modules/qs/lib/utils.js
77 changes: 77 additions & 0 deletions Question 1/node_modules/qs/package.json
855 changes: 855 additions & 0 deletions Question 1/node_modules/qs/test/parse.js

Large diffs are not rendered by default.

909 changes: 909 additions & 0 deletions Question 1/node_modules/qs/test/stringify.js

Large diffs are not rendered by default.

136 changes: 136 additions & 0 deletions Question 1/node_modules/qs/test/utils.js
56 changes: 56 additions & 0 deletions Question 1/node_modules/range-parser/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/range-parser/LICENSE
84 changes: 84 additions & 0 deletions Question 1/node_modules/range-parser/README.md
162 changes: 162 additions & 0 deletions Question 1/node_modules/range-parser/index.js
44 changes: 44 additions & 0 deletions Question 1/node_modules/range-parser/package.json
308 changes: 308 additions & 0 deletions Question 1/node_modules/raw-body/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/raw-body/LICENSE
223 changes: 223 additions & 0 deletions Question 1/node_modules/raw-body/README.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/raw-body/SECURITY.md
87 changes: 87 additions & 0 deletions Question 1/node_modules/raw-body/index.d.ts
336 changes: 336 additions & 0 deletions Question 1/node_modules/raw-body/index.js
49 changes: 49 additions & 0 deletions Question 1/node_modules/raw-body/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/safe-buffer/LICENSE
584 changes: 584 additions & 0 deletions Question 1/node_modules/safe-buffer/README.md

Large diffs are not rendered by default.

187 changes: 187 additions & 0 deletions Question 1/node_modules/safe-buffer/index.d.ts
65 changes: 65 additions & 0 deletions Question 1/node_modules/safe-buffer/index.js
51 changes: 51 additions & 0 deletions Question 1/node_modules/safe-buffer/package.json
21 changes: 21 additions & 0 deletions Question 1/node_modules/safer-buffer/LICENSE
268 changes: 268 additions & 0 deletions Question 1/node_modules/safer-buffer/Porting-Buffer.md
156 changes: 156 additions & 0 deletions Question 1/node_modules/safer-buffer/Readme.md
58 changes: 58 additions & 0 deletions Question 1/node_modules/safer-buffer/dangerous.js
34 changes: 34 additions & 0 deletions Question 1/node_modules/safer-buffer/package.json
77 changes: 77 additions & 0 deletions Question 1/node_modules/safer-buffer/safer.js
406 changes: 406 additions & 0 deletions Question 1/node_modules/safer-buffer/tests.js

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions Question 1/node_modules/send/HISTORY.md

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions Question 1/node_modules/send/LICENSE
327 changes: 327 additions & 0 deletions Question 1/node_modules/send/README.md
24 changes: 24 additions & 0 deletions Question 1/node_modules/send/SECURITY.md
1,143 changes: 1,143 additions & 0 deletions Question 1/node_modules/send/index.js

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions Question 1/node_modules/send/node_modules/ms/index.js
21 changes: 21 additions & 0 deletions Question 1/node_modules/send/node_modules/ms/license.md
38 changes: 38 additions & 0 deletions Question 1/node_modules/send/node_modules/ms/package.json
59 changes: 59 additions & 0 deletions Question 1/node_modules/send/node_modules/ms/readme.md
62 changes: 62 additions & 0 deletions Question 1/node_modules/send/package.json
471 changes: 471 additions & 0 deletions Question 1/node_modules/serve-static/HISTORY.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Question 1/node_modules/serve-static/LICENSE
257 changes: 257 additions & 0 deletions Question 1/node_modules/serve-static/README.md
210 changes: 210 additions & 0 deletions Question 1/node_modules/serve-static/index.js
42 changes: 42 additions & 0 deletions Question 1/node_modules/serve-static/package.json
27 changes: 27 additions & 0 deletions Question 1/node_modules/set-function-length/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/set-function-length/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/set-function-length/.nycrc
70 changes: 70 additions & 0 deletions Question 1/node_modules/set-function-length/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/set-function-length/LICENSE
56 changes: 56 additions & 0 deletions Question 1/node_modules/set-function-length/README.md
9 changes: 9 additions & 0 deletions Question 1/node_modules/set-function-length/env.d.ts
25 changes: 25 additions & 0 deletions Question 1/node_modules/set-function-length/env.js
7 changes: 7 additions & 0 deletions Question 1/node_modules/set-function-length/index.d.ts
42 changes: 42 additions & 0 deletions Question 1/node_modules/set-function-length/index.js
102 changes: 102 additions & 0 deletions Question 1/node_modules/set-function-length/package.json
9 changes: 9 additions & 0 deletions Question 1/node_modules/set-function-length/tsconfig.json
13 changes: 13 additions & 0 deletions Question 1/node_modules/setprototypeof/LICENSE
31 changes: 31 additions & 0 deletions Question 1/node_modules/setprototypeof/README.md
2 changes: 2 additions & 0 deletions Question 1/node_modules/setprototypeof/index.d.ts
17 changes: 17 additions & 0 deletions Question 1/node_modules/setprototypeof/index.js
38 changes: 38 additions & 0 deletions Question 1/node_modules/setprototypeof/package.json
24 changes: 24 additions & 0 deletions Question 1/node_modules/setprototypeof/test/index.js
9 changes: 9 additions & 0 deletions Question 1/node_modules/side-channel/.editorconfig
11 changes: 11 additions & 0 deletions Question 1/node_modules/side-channel/.eslintrc
12 changes: 12 additions & 0 deletions Question 1/node_modules/side-channel/.github/FUNDING.yml
13 changes: 13 additions & 0 deletions Question 1/node_modules/side-channel/.nycrc
95 changes: 95 additions & 0 deletions Question 1/node_modules/side-channel/CHANGELOG.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/side-channel/LICENSE
2 changes: 2 additions & 0 deletions Question 1/node_modules/side-channel/README.md
27 changes: 27 additions & 0 deletions Question 1/node_modules/side-channel/index.d.ts
129 changes: 129 additions & 0 deletions Question 1/node_modules/side-channel/index.js
84 changes: 84 additions & 0 deletions Question 1/node_modules/side-channel/package.json
83 changes: 83 additions & 0 deletions Question 1/node_modules/side-channel/test/index.js
50 changes: 50 additions & 0 deletions Question 1/node_modules/side-channel/tsconfig.json
82 changes: 82 additions & 0 deletions Question 1/node_modules/statuses/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/statuses/LICENSE
136 changes: 136 additions & 0 deletions Question 1/node_modules/statuses/README.md
65 changes: 65 additions & 0 deletions Question 1/node_modules/statuses/codes.json
146 changes: 146 additions & 0 deletions Question 1/node_modules/statuses/index.js
49 changes: 49 additions & 0 deletions Question 1/node_modules/statuses/package.json
9 changes: 9 additions & 0 deletions Question 1/node_modules/toidentifier/HISTORY.md
21 changes: 21 additions & 0 deletions Question 1/node_modules/toidentifier/LICENSE
61 changes: 61 additions & 0 deletions Question 1/node_modules/toidentifier/README.md
32 changes: 32 additions & 0 deletions Question 1/node_modules/toidentifier/index.js
38 changes: 38 additions & 0 deletions Question 1/node_modules/toidentifier/package.json
259 changes: 259 additions & 0 deletions Question 1/node_modules/type-is/HISTORY.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/type-is/LICENSE
170 changes: 170 additions & 0 deletions Question 1/node_modules/type-is/README.md
266 changes: 266 additions & 0 deletions Question 1/node_modules/type-is/index.js
45 changes: 45 additions & 0 deletions Question 1/node_modules/type-is/package.json
4 changes: 4 additions & 0 deletions Question 1/node_modules/unpipe/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/unpipe/LICENSE
43 changes: 43 additions & 0 deletions Question 1/node_modules/unpipe/README.md
69 changes: 69 additions & 0 deletions Question 1/node_modules/unpipe/index.js
27 changes: 27 additions & 0 deletions Question 1/node_modules/unpipe/package.json
9 changes: 9 additions & 0 deletions Question 1/node_modules/utils-merge/.npmignore
20 changes: 20 additions & 0 deletions Question 1/node_modules/utils-merge/LICENSE
34 changes: 34 additions & 0 deletions Question 1/node_modules/utils-merge/README.md
23 changes: 23 additions & 0 deletions Question 1/node_modules/utils-merge/index.js
40 changes: 40 additions & 0 deletions Question 1/node_modules/utils-merge/package.json
39 changes: 39 additions & 0 deletions Question 1/node_modules/vary/HISTORY.md
22 changes: 22 additions & 0 deletions Question 1/node_modules/vary/LICENSE
101 changes: 101 additions & 0 deletions Question 1/node_modules/vary/README.md
149 changes: 149 additions & 0 deletions Question 1/node_modules/vary/index.js
43 changes: 43 additions & 0 deletions Question 1/node_modules/vary/package.json
871 changes: 871 additions & 0 deletions Question 1/package-lock.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions Question 1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "server",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"axios": "^1.7.5",
"cors": "^2.8.5",
"crypto": "^1.0.1",
"express": "^4.19.2"
}
}
23 changes: 23 additions & 0 deletions Question 2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
70 changes: 70 additions & 0 deletions Question 2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
20,005 changes: 20,005 additions & 0 deletions Question 2/package-lock.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions Question 2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.1",
"react-scripts": "5.0.1",
"react-toastify": "^10.0.5",
"styled-components": "^6.1.12",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Binary file added Question 2/public/favicon.ico
Binary file not shown.
43 changes: 43 additions & 0 deletions Question 2/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added Question 2/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Question 2/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions Question 2/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions Question 2/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
38 changes: 38 additions & 0 deletions Question 2/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
44 changes: 44 additions & 0 deletions Question 2/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import AllProductsPage from "./pages/AllProductPage";
import ProductDetailPage from "./pages/ProductDetailPage";
import { createGlobalStyle, ThemeProvider } from 'styled-components';

const GlobalStyle = createGlobalStyle`
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background-color: ${props => props.theme.colors.background};
color: ${props => props.theme.colors.text};
}
`;

const theme = {
colors: {
primary: '#3498db',
secondary: '#2ecc71',
background: '#f4f4f4',
text: '#333',
lightText: '#777',
border: '#ddd',
},
breakpoints: {
mobile: '768px',
}
};

function App() {
return (
<ThemeProvider theme={theme}>
<GlobalStyle />
<Router>
<Routes>
<Route path="/" element={<AllProductsPage />} />
<Route path="/product/:productId" element={<ProductDetailPage />} />
</Routes>
</Router>
</ThemeProvider>
);
}

export default App;
8 changes: 8 additions & 0 deletions Question 2/src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
113 changes: 113 additions & 0 deletions Question 2/src/components/FilterBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import React from "react";
import styled from "styled-components";

const FilterContainer = styled.div`
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
`;

const Select = styled.select`
padding: 8px;
border: 1px solid ${(props) => props.theme.colors.border};
border-radius: 4px;
background-color: white;
font-size: 1rem;
`;

const Input = styled.input`
padding: 8px;
border: 1px solid ${(props) => props.theme.colors.border};
border-radius: 4px;
font-size: 1rem;
`;

const FilterBar = ({ filters, setFilters, setSortBy, setOrder }) => {
const validCategories = [
"Phone",
"Computer",
"TV",
"Earphone",
"Tablet",
"Charger",
"Mouse",
"Keypad",
"Bluetooth",
"Pendrive",
"Remote",
"Speaker",
"Headset",
"Laptop",
"PC",
];
const validCompanies = ["AMZ", "FLP", "SNP", "MYN", "AZO"];

return (
<FilterContainer>
<Select
value={filters.category}
onChange={(e) => setFilters({ ...filters, category: e.target.value })}
>
{validCategories.map((category) => (
<option key={category} value={category}>
{category}
</option>
))}
</Select>

<Select
value={filters.company}
onChange={(e) => setFilters({ ...filters, company: e.target.value })}
>
<option value="">All Companies</option>
{validCompanies.map((company) => (
<option key={company} value={company}>
{company}
</option>
))}
</Select>

<select
value={filters.rating}
onChange={(e) =>
setFilters({ ...filters, rating: Number(e.target.value) })
}
>
<option value={0}>All Ratings</option>
<option value={4}>4 Stars & Up</option>
<option value={3}>3 Stars & Up</option>
</select>

<Input
type="number"
placeholder="Min Price"
value={filters.minPrice}
onChange={(e) =>
setFilters({ ...filters, minPrice: Number(e.target.value) })
}
/>
<Input
type="number"
placeholder="Max Price"
value={filters.maxPrice}
onChange={(e) =>
setFilters({ ...filters, maxPrice: Number(e.target.value) })
}
/>

<Select onChange={(e) => setSortBy(e.target.value)}>
<option value="price">Sort by Price</option>
<option value="rating">Sort by Rating</option>
<option value="discount">Sort by Discount</option>
</Select>

<Select onChange={(e) => setOrder(e.target.value)}>
<option value="asc">Ascending</option>
<option value="desc">Descending</option>
</Select>
</FilterContainer>
);
};

export default FilterBar;
50 changes: 50 additions & 0 deletions Question 2/src/components/Pagination.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from "react";
import styled from "styled-components";

const PaginationContainer = styled.div`
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
`;

const PageButton = styled.button`
padding: 8px 16px;
margin: 0 5px;
border: none;
background-color: ${(props) => props.theme.colors.primary};
color: white;
border-radius: 4px;
cursor: pointer;
&:disabled {
background-color: ${(props) => props.theme.colors.lightText};
cursor: not-allowed;
}
`;

const PageInfo = styled.div`
margin: 0 10px;
font-size: 1rem;
`;

const Pagination = ({ page, setPage, totalPages }) => {
return (
<PaginationContainer>
<PageButton onClick={() => setPage(page - 1)} disabled={page === 1}>
Previous
</PageButton>
<PageInfo>
{page} of {totalPages}
</PageInfo>
<PageButton
onClick={() => setPage(page + 1)}
disabled={page === totalPages}
>
Next
</PageButton>
</PaginationContainer>
);
};

export default Pagination;
56 changes: 56 additions & 0 deletions Question 2/src/components/ProductCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from "react";
import styled from "styled-components";
import { Link } from "react-router-dom";

const Card = styled(Link)`
display: block;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.2s;
text-decoration: none;
color: ${(props) => props.theme.colors.text};
&:hover {
transform: translateY(-5px);
}
`;

const CardImage = styled.img`
width: 100%;
height: 200px;
object-fit: cover;
`;

const CardContent = styled.div`
padding: 15px;
`;

const CardTitle = styled.h2`
font-size: 1.2rem;
margin-bottom: 10px;
`;

const CardInfo = styled.p`
font-size: 1rem;
color: ${(props) => props.theme.colors.lightText};
margin-bottom: 5px;
`;

const ProductCard = ({ product }) => {
const randomImageUrl = `https://picsum.photos/seed/${product.id}/300/200`;

return (
<Card to={`/product/${product.id}`}>
<CardImage src={randomImageUrl} alt={product.name} />
<CardContent>
<CardTitle>{product.name}</CardTitle>
<CardInfo>Price: Rs.{product.price}</CardInfo>
<CardInfo>Rating: {product.rating}</CardInfo>
</CardContent>
</Card>
);
};

export default ProductCard;
13 changes: 13 additions & 0 deletions Question 2/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
17 changes: 17 additions & 0 deletions Question 2/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
1 change: 1 addition & 0 deletions Question 2/src/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions Question 2/src/pages/AllProductPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import React, { useState, useEffect } from "react";
import axios from "axios";
import ProductCard from "../components/ProductCard";
import FilterBar from "../components/FilterBar";
import Pagination from "../components/Pagination";
import styled from "styled-components";

const PageContainer = styled.div`
max-width: 1200px;
margin: 0 auto;
padding: 20px;
`;

const Title = styled.h1`
font-size: 2.5rem;
color: ${(props) => props.theme.colors.primary};
margin-bottom: 20px;
`;

const ProductGrid = styled.div`
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
`;

const AllProductsPage = () => {
const [products, setProducts] = useState([]);
const [filters, setFilters] = useState({
category: "Laptop",
company: "",
rating: 0,
minPrice: 1,
maxPrice: 10000,
availability: "all",
});
const [sortBy, setSortBy] = useState("price");
const [order, setOrder] = useState("asc");
const [page, setPage] = useState(1);
const [totalPages, setTotalPages] = useState(1);

useEffect(() => {
fetchProducts();
}, [filters, sortBy, order, page]);

const fetchProducts = async () => {
const { category, minPrice, maxPrice } = filters;
try {
const response = await axios.get(
`http://localhost:5000/categories/${category}/products`,
{
params: { n: 10, page, sort_by: sortBy, order, minPrice, maxPrice },
}
);
setProducts(response.data);
setTotalPages(Math.ceil(response.data.length / 10));
} catch (error) {
console.error("Failed to fetch products:", error);
}
};

return (
<PageContainer>
<Title>All Products</Title>
<FilterBar
filters={filters}
setFilters={setFilters}
setSortBy={setSortBy}
setOrder={setOrder}
/>
<ProductGrid>
{products.map((product) => (
<ProductCard key={product.id} product={product} />
))}
</ProductGrid>
<Pagination page={page} setPage={setPage} totalPages={totalPages} />
</PageContainer>
);
};

export default AllProductsPage;
70 changes: 70 additions & 0 deletions Question 2/src/pages/ProductDetailPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React, { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import axios from "axios";
import styled from "styled-components";
const DetailContainer = styled.div`
max-width: 800px;
margin: 0 auto;
padding: 20px;
`;

const ProductTitle = styled.h1`
font-size: 2rem;
color: ${(props) => props.theme.colors.primary};
margin-bottom: 20px;
`;

const ProductImage = styled.img`
width: 100%;
height: auto;
border-radius: 8px;
margin-bottom: 20px;
`;

const ProductInfo = styled.p`
font-size: 1.1rem;
margin-bottom: 10px;
&.bold {
font-weight: bold;
}
`;

const ProductDetailPage = () => {
const { productId } = useParams();
const [product, setProduct] = useState(null);

useEffect(() => {
fetchProduct();
}, [productId]);

const fetchProduct = async () => {
try {
const response = await axios.get(
`http://localhost:5000/categories/Laptop/products/${productId}`
);
setProduct(response.data);
} catch (error) {
console.error("Failed to fetch product:", error);
}
};

if (!product) return <div>Loading...</div>;

const randomImageUrl = `https://picsum.photos/seed/${product.id}/600/400`;

return (
<DetailContainer>
<ProductTitle>{product.name}</ProductTitle>
<ProductImage src={randomImageUrl} alt={product.name} />
<ProductInfo className="bold">Price: Rs.{product.price}</ProductInfo>
<ProductInfo className="bold">Rating: {product.rating}</ProductInfo>
<ProductInfo className="bold">Discount: {product.discount}%</ProductInfo>
<ProductInfo className="bold">
Availability: {product.availability}
</ProductInfo>
</DetailContainer>
);
};

export default ProductDetailPage;
13 changes: 13 additions & 0 deletions Question 2/src/reportWebVitals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};

export default reportWebVitals;
5 changes: 5 additions & 0 deletions Question 2/src/setupTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

0 comments on commit 5d7d61c

Please sign in to comment.
Copied!